package com.gewu.pm.ui.adapter.home;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;

import com.gewu.pm.R;
import com.gewu.pm.app.AppAdapter;
import com.gewu.pm.bean.TestBean;

/**
 * 配送商销售分析报表--销售区域
 */
public class DistributorSalesAreaAdapter extends AppAdapter<TestBean> {
    public DistributorSalesAreaAdapter(Context context) {
        super(context);
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new ItemViewHolder();
    }

    private final class ItemViewHolder extends AppAdapter<?>.ViewHolder {

        private final TextView mTitleView;

        private ItemViewHolder() {
            super(R.layout.distributor_sales_area_item);
            mTitleView = findViewById(R.id.tv_title);

        }

        @Override
        public void onBindView(int position) {
            TestBean item = getItem(position);
            
            mTitleView.setText(item.getName());

        }
    }
}
